<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goods', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->comment('标题');
            $table->decimal('price',6,2)->comment('价格');
            $table->decimal('cost',6,2)->comment('原价');
            $table->decimal('grade',6,2)->comment('评分');
            $table->string('color')->comment('颜色');
            $table->string('size')->comment('尺码');
            $table->integer('kucun')->comment('库存');
            $table->text('detail')->comment('详情');
            $table->integer('status')->comment('上下架状态');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('goods');
    }
}
